package com.spring.component;

import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

public class App {
    public static void main(String[] args) {
        ApplicationContext beans=new AnnotationConfigApplicationContext("com.spring");
/*        DemoD dd = beans.getBean("demoD", DemoD.class);
        dd.print();*/
/*        DemoE de = beans.getBean("demoE", DemoE.class);
        DemoE de2 = beans.getBean("demoE", DemoE.class);
        de.print();
        de2.print();
        System.out.println(de==de2);*/
        DemoF df=beans.getBean("demoF",DemoF.class);
        System.out.println(df);
    }


}
